std: reduce visibility of some internal OsStr related types - #161589
Merged
Conversation
The std::sys::os_str::{Buf, Slice} types are only used within the std
crate and not actually exported. Whole `sys` module is private. They
don't need to be public. This might result in a better generated code,
but more importantly it avoids some compile errors down the line.
Collaborator
|
r? @JohnTitor rustbot has assigned @JohnTitor. Use Why was this reviewer chosen?The reviewer was selected based on:
|
Contributor
|
I thought we had |
Contributor
Author
|
Contributor
Author
|
I can make a separate pull request for all that stuff I guess. Want to keep this focused on #160971 related stuff. |
Contributor
|
Fair enough. I'll just merge this then. @bors r+ rollup |
Contributor
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
Aug 23, 2026
std: reduce visibility of some internal OsStr related types
The std::sys::os_str::{Buf, Slice} types are only used within the std crate and not actually exported. Whole `sys` module is private. They don't need to be public. This might result in a better generated code, but more importantly it avoids some compile errors down the line.
This commit is extracted from rust-lang#160971
rust-bors Bot
pushed a commit
that referenced
this pull request
Aug 23, 2026
…uwer Rollup of 14 pull requests Successful merges: - #160302 (target_features: sse (or at least avx2) is incompatible with soft-float ABI) - #161187 (add `Complex<T>` layout tests for straightforward targets) - #161524 (Put back `tests/rustdoc-gui/search-result-display.goml`) - #161586 (miri subtree update) - #155254 (Recover on attribute in use tree) - #158695 (Replace `CrateDump` with the Debug impl from `CStore`) - #160452 (-Ctarget-feature is not unsafe (any more)) - #161007 (tests/ui/union/union-nodrop.rs: fix typo "expressios") - #161166 (add crashtests [5/N], remove unused aux files ) - #161569 (Bump cfg_aliases to 0.2.2) - #161573 (re-bless `pretty-std` on windows) - #161588 (update eyre) - #161589 (std: reduce visibility of some internal OsStr related types) - #161598 ([Bootstrap] Pass exact CI `llvm-config` executable path)
rust-bors Bot
pushed a commit
that referenced
this pull request
Aug 23, 2026
…uwer Rollup of 14 pull requests Successful merges: - #160302 (target_features: sse (or at least avx2) is incompatible with soft-float ABI) - #161187 (add `Complex<T>` layout tests for straightforward targets) - #161524 (Put back `tests/rustdoc-gui/search-result-display.goml`) - #161586 (miri subtree update) - #155254 (Recover on attribute in use tree) - #158695 (Replace `CrateDump` with the Debug impl from `CStore`) - #160452 (-Ctarget-feature is not unsafe (any more)) - #161007 (tests/ui/union/union-nodrop.rs: fix typo "expressios") - #161166 (add crashtests [5/N], remove unused aux files ) - #161569 (Bump cfg_aliases to 0.2.2) - #161573 (re-bless `pretty-std` on windows) - #161588 (update eyre) - #161589 (std: reduce visibility of some internal OsStr related types) - #161598 ([Bootstrap] Pass exact CI `llvm-config` executable path)
This was referenced Aug 23, 2026
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
Aug 23, 2026
std: reduce visibility of some internal OsStr related types
The std::sys::os_str::{Buf, Slice} types are only used within the std crate and not actually exported. Whole `sys` module is private. They don't need to be public. This might result in a better generated code, but more importantly it avoids some compile errors down the line.
This commit is extracted from rust-lang#160971
rust-bors Bot
pushed a commit
that referenced
this pull request
Aug 23, 2026
…uwer Rollup of 17 pull requests Successful merges: - #161187 (add `Complex<T>` layout tests for straightforward targets) - #161524 (Put back `tests/rustdoc-gui/search-result-display.goml`) - #161592 (core: refactor tests/pattern.rs tests) - #161602 (Fix flakyness issue for `tests/rustdoc-gui/headers-color.goml`) - #155254 (Recover on attribute in use tree) - #158695 (Replace `CrateDump` with the Debug impl from `CStore`) - #159456 (Fix the reporting of layout normalization failures in transmute checks) - #160452 (-Ctarget-feature is not unsafe (any more)) - #161007 (tests/ui/union/union-nodrop.rs: fix typo "expressios") - #161166 (add crashtests [5/N], remove unused aux files ) - #161569 (Bump cfg_aliases to 0.2.2) - #161573 (re-bless `pretty-std` on windows) - #161588 (update eyre) - #161589 (std: reduce visibility of some internal OsStr related types) - #161598 ([Bootstrap] Pass exact CI `llvm-config` executable path) - #161601 (Path: use optimized is_empty() method) - #161604 (coretests: Add a few tests for backward multibyte predicate)
Zalathar
added a commit
to Zalathar/rust
that referenced
this pull request
Aug 24, 2026
std: reduce visibility of some internal OsStr related types
The std::sys::os_str::{Buf, Slice} types are only used within the std crate and not actually exported. Whole `sys` module is private. They don't need to be public. This might result in a better generated code, but more importantly it avoids some compile errors down the line.
This commit is extracted from rust-lang#160971
rust-bors Bot
pushed a commit
that referenced
this pull request
Aug 24, 2026
Rollup of 24 pull requests Successful merges: - #161586 (miri subtree update) - #161187 (add `Complex<T>` layout tests for straightforward targets) - #161524 (Put back `tests/rustdoc-gui/search-result-display.goml`) - #161592 (core: refactor tests/pattern.rs tests) - #161602 (Fix flakyness issue for `tests/rustdoc-gui/headers-color.goml`) - #152433 (Use `symlink_dir` to create junctions on Windows instead of trying to use symbolic links in `copy_link_internal`) - #155254 (Recover on attribute in use tree) - #158695 (Replace `CrateDump` with the Debug impl from `CStore`) - #159456 (Fix the reporting of layout normalization failures in transmute checks) - #159940 (Eliminate some buggy `unreachable!()`s in `expand_[option_]env()`) - #160452 (-Ctarget-feature is not unsafe (any more)) - #161007 (tests/ui/union/union-nodrop.rs: fix typo "expressios") - #161166 (add crashtests [5/N], remove unused aux files ) - #161294 (add crashtests [6/N]) - #161552 (also trigger overflow FCW when going from overflow -> error) - #161569 (Bump cfg_aliases to 0.2.2) - #161573 (re-bless `pretty-std` on windows) - #161580 (Add codegen test for redundant bit mask after a range check) - #161588 (update eyre) - #161589 (std: reduce visibility of some internal OsStr related types) - #161598 ([Bootstrap] Pass exact CI `llvm-config` executable path) - #161601 (Path: use optimized is_empty() method) - #161604 (coretests: Add a few tests for backward multibyte predicate) - #161615 (interpret: make validate_c_variadic_compatible_ty public)
rust-bors Bot
pushed a commit
that referenced
this pull request
Aug 24, 2026
Rollup of 22 pull requests Successful merges: - #161586 (miri subtree update) - #161187 (add `Complex<T>` layout tests for straightforward targets) - #161524 (Put back `tests/rustdoc-gui/search-result-display.goml`) - #161592 (core: refactor tests/pattern.rs tests) - #161602 (Fix flakyness issue for `tests/rustdoc-gui/headers-color.goml`) - #152433 (Use `symlink_dir` to create junctions on Windows instead of trying to use symbolic links in `copy_link_internal`) - #155254 (Recover on attribute in use tree) - #158695 (Replace `CrateDump` with the Debug impl from `CStore`) - #159456 (Fix the reporting of layout normalization failures in transmute checks) - #159940 (Eliminate some buggy `unreachable!()`s in `expand_[option_]env()`) - #160452 (-Ctarget-feature is not unsafe (any more)) - #161007 (tests/ui/union/union-nodrop.rs: fix typo "expressios") - #161552 (also trigger overflow FCW when going from overflow -> error) - #161569 (Bump cfg_aliases to 0.2.2) - #161573 (re-bless `pretty-std` on windows) - #161580 (Add codegen test for redundant bit mask after a range check) - #161588 (update eyre) - #161589 (std: reduce visibility of some internal OsStr related types) - #161598 ([Bootstrap] Pass exact CI `llvm-config` executable path) - #161601 (Path: use optimized is_empty() method) - #161604 (coretests: Add a few tests for backward multibyte predicate) - #161615 (interpret: make validate_c_variadic_compatible_ty public)
rust-bors Bot
pushed a commit
that referenced
this pull request
Aug 24, 2026
Rollup merge of #161589 - pacak:private-osstr, r=clarfonthey std: reduce visibility of some internal OsStr related types The std::sys::os_str::{Buf, Slice} types are only used within the std crate and not actually exported. Whole `sys` module is private. They don't need to be public. This might result in a better generated code, but more importantly it avoids some compile errors down the line. This commit is extracted from #160971
RalfJung
pushed a commit
to RalfJung/miri
that referenced
this pull request
Aug 24, 2026
Rollup of 22 pull requests Successful merges: - rust-lang/rust#161586 (miri subtree update) - rust-lang/rust#161187 (add `Complex<T>` layout tests for straightforward targets) - rust-lang/rust#161524 (Put back `tests/rustdoc-gui/search-result-display.goml`) - rust-lang/rust#161592 (core: refactor tests/pattern.rs tests) - rust-lang/rust#161602 (Fix flakyness issue for `tests/rustdoc-gui/headers-color.goml`) - rust-lang/rust#152433 (Use `symlink_dir` to create junctions on Windows instead of trying to use symbolic links in `copy_link_internal`) - rust-lang/rust#155254 (Recover on attribute in use tree) - rust-lang/rust#158695 (Replace `CrateDump` with the Debug impl from `CStore`) - rust-lang/rust#159456 (Fix the reporting of layout normalization failures in transmute checks) - rust-lang/rust#159940 (Eliminate some buggy `unreachable!()`s in `expand_[option_]env()`) - rust-lang/rust#160452 (-Ctarget-feature is not unsafe (any more)) - rust-lang/rust#161007 (tests/ui/union/union-nodrop.rs: fix typo "expressios") - rust-lang/rust#161552 (also trigger overflow FCW when going from overflow -> error) - rust-lang/rust#161569 (Bump cfg_aliases to 0.2.2) - rust-lang/rust#161573 (re-bless `pretty-std` on windows) - rust-lang/rust#161580 (Add codegen test for redundant bit mask after a range check) - rust-lang/rust#161588 (update eyre) - rust-lang/rust#161589 (std: reduce visibility of some internal OsStr related types) - rust-lang/rust#161598 ([Bootstrap] Pass exact CI `llvm-config` executable path) - rust-lang/rust#161601 (Path: use optimized is_empty() method) - rust-lang/rust#161604 (coretests: Add a few tests for backward multibyte predicate) - rust-lang/rust#161615 (interpret: make validate_c_variadic_compatible_ty public)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The std::sys::os_str::{Buf, Slice} types are only used within the std crate and not actually exported. Whole
sysmodule is private. They don't need to be public. This might result in a better generated code, but more importantly it avoids some compile errors down the line.This commit is extracted from #160971